//
// Created by Castle-Moriarty on 2025/11/8.
//

#include <cstring>
#include <iostream>
using namespace std;

template <typename T> T maximnu(T a,T b);
// template specialization
template <>
const char *maximum<const char*> (const char *a,const char *b) {
    return strcmp(a,b) > 0 ? a : b;
}


int main() {
    int a{10};
    int b{23};

    double c{3.14159};
    double d{32.45};

    string e{"hello"};
    string f{"world"};

    auto maxInt = maximnu(a,b);
    auto maxDouble = maximnu(c,d);
    auto maxString = maximnu(e,f);

    cout << "maxint : " << maxInt << endl;
    cout << "maxDouble : " << maxDouble << endl;
    cout << "maxString : " << maxString << endl;

    const char *g{"wild"};
    const char *h{"animal"};

    cout << "max(const char*):" << maximum(g,h) << endl;

    return 0;
}